package cn.it.infrastructure.mapper;


import cn.it.infrastructure.po.TbGoods;
import cn.it.infrastructure.po.TbType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author ASUS
* @description 针对表【tb_goods】的数据库操作Mapper
* @createDate 2024-07-04 17:27:57
* @Entity po.TbGoods
*/
@Mapper
public interface IGoodsMapper {

    int deleteByPrimaryKey(Long id);

    int insert(TbGoods record);

    int insertSelective(TbGoods record);

    /**
     * 根据id查询商品价格
     * @param id
     * @return
     */
    TbGoods getRealPriceById(Long id);

    TbGoods selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TbGoods record);

    int updateByPrimaryKey(TbGoods record);

    /**
     * 根据内容查询商品
     * @param content
     */
    List<TbGoods> queryGoodsByContent(String content);

    /**
     * 根据商家ID查询商品
     * @param businessId
     */
    List<TbGoods> queryGoodsByBusinessId(Long businessId);

}
